/*
 * @Author: lihaogn
 * @Date: 2022-05-28 10:03:56
 * @LastEditTime: 2022-05-28 10:07:08
 * @LastEditor: lihaogn
 * @Description: userrole 关联表种子文件
 *   创建种子文件命令：npx sequelize-cli seed:generate --name seeder-user-role
 *   运行种子文件命令：npx sequelize-cli db:seed --seed 04-seeder-user-role
 * @FilePath: \lix-admin-server\database\seeders\04-seeder-user-role.js
 */
"use strict";

module.exports = {
  up: async (queryInterface, Sequelize) => {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
     */

    return queryInterface.bulkInsert(
      "userrole",
      [
        {
          user_id: "000",
          role_id: "000",
          created_at: new Date(),
          updated_at: new Date(),
        },
        {
          user_id: "001",
          role_id: "001",
          created_at: new Date(),
          updated_at: new Date(),
        },
      ],
      {}
    );
  },

  down: async (queryInterface, Sequelize) => {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */

    return queryInterface.bulkDelete("users", null, {});
  },
};
